//
//  ViewController.m
//  nstimer循环引用
//
//  Created by keisun on 2018/10/31.
//  Copyright © 2018年 keisun. All rights reserved.
//

#import "ViewController.h"
#import "BViewController.h"
#import "CViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.navigationController.navigationBar.hidden = YES;
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 60, 40)];
    [btn setTitle:@"点击" forState:UIControlStateNormal];
    btn.backgroundColor = [UIColor blueColor];
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchDown];
    [self.view addSubview:btn];
}

-(void)btnClick{
    BViewController *bvc = [[BViewController alloc] init];
    [self presentViewController:bvc animated:YES completion:nil];
    
//    CViewController *cvc = [[CViewController alloc] init];
//    [self.navigationController pushViewController:cvc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
